using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using ClassLibrary1.Models.Mapping;

namespace ClassLibrary1.Models
{
    public class Ly_CrmContext : DbContext
    {
        static Ly_CrmContext()
        {
            Database.SetInitializer<Ly_CrmContext>(null);
        }

		public Ly_CrmContext()
			: base("Name=Ly_CrmContext")
		{
		}

        public DbSet<Bs_Company> Bs_Company { get; set; }
        public DbSet<Bs_Department> Bs_Department { get; set; }
        public DbSet<Bs_UserInfo> Bs_UserInfo { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new Bs_CompanyMap());
            modelBuilder.Configurations.Add(new Bs_DepartmentMap());
            modelBuilder.Configurations.Add(new Bs_UserInfoMap());
        }
    }
}
